export default function (float, length = 0) {
  let parts = (String(float)).split('.')
  let result
  if (parts.length === 1) {
    result = float + new Array(length + 1).join('0')
  } else {
    let l = Math.max(0, length - parts[1].length)
    result = parts.join('') + new Array(l + 1).join('0')
  }
  return Number(result)
}
